<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <link rel="stylesheet" href="css/style.css" type="text/css"/>
        <script type="text/javascript" charset="utf-8" src="jquery/jquery-1.3.2.min.js"></script>
        <script type="text/javascript" charset="utf-8" src="jquery/jquery.validate.js"></script>
        <script type="text/javascript" src="jquery/slide-show.js"></script>
         <link rel="stylesheet" href="jquery-ui-1.10.4/jquery-ui-1.10.4/themes/base/jquery.ui.all.css">
	<script src="jquery-ui-1.10.4/jquery-ui-1.10.4/jquery-1.10.2.js"></script>
	<script src="jquery-ui-1.10.4/jquery-ui-1.10.4/ui/jquery.ui.core.js"></script>
	<script src="jquery-ui-1.10.4/jquery-ui-1.10.4/ui/jquery.ui.widget.js"></script>
	<script src="jquery-ui-1.10.4/jquery-ui-1.10.4/ui/jquery.ui.position.js"></script>
	<script src="jquery-ui-1.10.4/jquery-ui-1.10.4/ui/jquery.ui.menu.js"></script>
	<link rel="stylesheet" href="jquery-ui-1.10.4/jquery-ui-1.10.4/demos/demos.css">
        <title>Fashion shop</title>
    </head>
    <body>
        <div id="wrapper">
            <?php include 'template/header.php' ?>
            <div id="main">
                <?php include'template/sidebar.php' ?>
                <div id="content">
                    <div class="slide-container">
                        <div class="slide-stage">
                            <div class="slide-image"><img src="public/templates/admin/images/slideshow/anh1_1.jpg"/></div>
                            <div class="slide-image"><img src="public/templates/admin/images/slideshow/anh1.jpg"/></div>
                            <div class="slide-image"><img src="public/templates/admin/images/slideshow/anh2.jpg"/></div>
                            <div class="slide-image"><img src="public/templates/admin/images/slideshow/anh3.jpg"/></div>
                            <div class="slide-image"><img src="public/templates/admin/images/slideshow/anh4.jpg"/></div>
                        </div>
                        <div class="slide-pager">
                            <ul></ul>
                            <div class="slide-control-prev">«</div>
                            <div class="slide-control-next">»</div>
                        </div>
                    </div>
                    <div id="products">
                        <div class="paging">
                            <div class="first">
                                <h2>Thời trang mới về</h2>
                            </div>
                        </div><!---END #paging--->
                        
                        <?php
                        include 'Connect_db.php';
                        Connect_db();
                        include 'Paging.php';
                         $paging = new Paging();
                    $limit = 6;
                    $paging->findTotal('product');
                    $paging->findPages($limit);
                    $start = $paging->rowStart($limit);
                    $curpage = ($start / $limit) + 1;
                        $product_new = getProductNew($start,$limit);
                        ?>
                          <div style="font-size: 16px">
                        <?php
                       echo $paging->pagesList($curpage);
                       ?>
                            </div>
                        <?php
                        foreach ($product_new as $key => $value) {
                        ?>
                        
                        <div class="product">
                            <div class="product-img"><a href="product-detail.php?pro_id=<?php echo $value['id']?>"><img src="public/templates/admin/<?php echo $value['pro_img']; ?>" alt="sp1"/></a></div>
                            <div class="product-name"><a href="product-detail.php?pro_id=<?php echo $value['id']?>"><?php echo $value['pro_name'] ?></a></div>
                            <div class="product-id"><p>Mã số:<?php echo $value['id'] ?></p></div>
                            <div class="product-price-old"><strike>Giá cũ: <?php echo number_format($value['pro_price_old']) ?>đ</strike></div>
                            <div class="product-price"><span>Giá mới: <?php echo number_format($value['pro_price'])?>đ</span></div>
                        </div><!---END .product-->
                        <?php
                        }
                        ?>
                    </div><!---END #products--->
                    <div id="products">
                        <div class="paging">
                            <div class="first">
                                <h2>Thời trang bán chạy nhất</h2>
                            </div>
                        </div><!---END #paging--->
                        <?php
                        $product_best = productBestBuy();
                        foreach ($product_best as $key => $value) {
                        ?>
                        <div class="product">
                            <div class="product-img"><a href="product-detail.php?pro_id=<?php echo $value['id']?>"><img src="public/templates/admin/<?php echo $value['pro_img']; ?>" alt="sp1"/></a></div>
                            <div class="product-name"><a href="product-detail.php?pro_id=<?php echo $value['id']?>"><?php echo $value['pro_name'] ?></a></div>
                            <div class="product-id"><p>Mã số:<?php echo $value['id'] ?></p></div>
                            <div class="product-price-old"><strike>Giá cũ: <?php echo number_format($value['pro_price_old']) ?>đ</strike></div>
                            <div class="product-price"><span>Giá mới: <?php echo number_format($value['pro_price'])?>đ</span></div>
                        </div><!---END .product-->
                        <?php
                        }
                        ?>
                    </div><!---END #products--->
                    <div id="products">
                        <div class="paging">
                            <div class="first">
                                <h2>Giày nữ thời trang</h2>
                            </div>
                        </div><!---END #paging--->
                        
                       <?php
                       $product_shoe = getProduct_shoe();
                        foreach ($product_shoe as $key => $value) {
                        ?>
                       
                        <div class="product">
                            <div class="product-img"><a href="product-detail.php?pro_id=<?php echo $value['id']?>"><img src="public/templates/admin/<?php echo $value['pro_img']; ?>" alt="sp1"/></a></div>
                            <div class="product-name"><a href="product-detail.php?pro_id=<?php echo $value['id']?>"><?php echo $value['pro_name'] ?></a></div>
                            <div class="product-id"><p>Mã số:<?php echo $value['id'] ?></p></div>
                            <div class="product-price-old"><strike>Giá cũ: <?php echo $value['pro_price_old'] ?></strike></div>
                            <div class="product-price"><span>Giá mới: <?php echo $value['pro_price']?></span></div>
                      
                        </div><!---END .product-->
                      
                        <?php
                        }
                       ?>
                        <div>
                            <a href="product.php?cate_id=7" style="font-size: 18px;color:blue ;float:right;marging-bottom: 30px"> xem thêm >>></a>
                        </div>
                    </div><!---END #products--->
                    
                    <div id="products">
                        <div class="paging">
                            <div class="first">
                                <h2>Túi xách thời trang</h2>
                            </div>
                        </div><!---END #paging--->
                        <?php
                       $product_bag = getProduct_bag();
                        foreach ($product_bag as $key => $value) {
                        ?>
                        <div class="product">
                            <div class="product-img"><a href="product-detail.php?pro_id=<?php echo $value['id']?>"><img src="public/templates/admin/<?php echo $value['pro_img']; ?>" alt="sp1"/></a></div>
                            <div class="product-name"><a href="product-detail.php?pro_id=<?php echo $value['id']?>"><?php echo $value['pro_name'] ?></a></div>
                            <div class="product-id"><p>Mã số:<?php echo $value['id'] ?></p></div>
                            <div class="product-price-old"><strike>Giá cũ: <?php echo number_format($value['pro_price_old']) ?></strike></div>
                            <div class="product-price"><span>Giá mới: <?php echo $value['pro_price']?></span></div>
                        </div><!---END .product-->
                        <?php
                        }
                       ?>
                    </div><!---END #products--->
                    <div id="products">
                        <div class="paging">
                            <div class="first">
                                <h2>Phụ kiện thời trang</h2>
                            </div>
                        </div><!---END #paging--->
                        <?php
                       $product_other = getProduct_other();
                        foreach ($product_other as $key => $value) {
                        ?>
                        <div class="product">
                            <div class="product-img"><a href="product-detail.php?pro_id=<?php echo $value['id']?>"><img src="public/templates/admin/<?php echo $value['pro_img']; ?>" alt="sp1"/></a></div>
                            <div class="product-name"><a href="product-detail.php?pro_id=<?php echo $value['id']?>"><?php echo $value['pro_name'] ?></a></div>
                            <div class="product-id"><p>Mã số:<?php echo $value['id'] ?></p></div>
                            <div class="product-price-old"><strike>Giá cũ: <?php echo $value['pro_price_old'] ?></strike></div>
                            <div class="product-price"><span>Giá mới: <?php echo $value['pro_price']?></span></div>
                        </div><!---END .product-->
                        <?php
                        }
                       ?>
                    </div><!---END #products--->
                </div><!---END #content--->
                <div id="khuyenmai">
                    <img src="public/templates/admin/images/promotion.png" alt=""/>
                </div>
            </div><!--END #main-->
            <?php include 'template/footer.php' ?>
        </div><!---END #wrapper--->
    </body>
</html>
